<template>
  <div>
    <div class="title">
      <span class="iconfont">&#xe64b;</span>
      <span class="title-span">猜你喜欢</span>
    </div>
    <div class="recommend" v-for="item in recommendList" :key="item.id">
      <div class="recommend-img">
        <img class="recommend-img-content" :src="item.imgUrl" alt="">
      </div>
      <div class="recommend-content">
        <div class="recommend-content_title">{{item.contentTitle}}</div>
        <div>
          <div class="recommend-content_area">{{item.contentArea}}</div>
        </div>
        <div v-if="item.contentOther" class="recommend-content_other">{{item.contentOther}}</div>
      </div>
    </div>      
  </div>
</template>

<script>
export default {
  name:"homeRecommend",
  props:{
    recommendList:Array
  }
}
</script>

<style lang="stylus" scoped>
@import ('~styles/mixins.styl');

.title {
  text-align: left;
  padding-left: 0.2rem;
  background-color: #EDEDED;
}

.title-span {
  height: 0.8rem;
  line-height: 0.8rem;
  border-bottom: 0.01rem solid #EDEDED;
  font-size: 0.33rem;
  margin-left: 0.08rem;
}

.recommend {
  display: flex;
  border-bottom: 0.01rem solid #EDEDED;

  .recommend-img {
    .recommend-img-content {
      height: 2rem;
      width: 2rem;
      float: left;
      padding: 0.2rem;
    }
  }

  .recommend-content {
    flex: 1;
    text-align: left;
    padding-left: 0.2rem;
    padding-bottom: 0.1rem;

    div {
      margin-top: 0.45rem;
      height: 0.5rem;
      line-height: 0.5rem;
    }

    .recommend-content_title {
      color: #212121;
      font-size: 0.4rem;
      ellipsis();
    }

    .recommend-content_area {
      color: #212121;
      font-size: 0.32rem;
      ellipsis();
    }

    .recommend-content_other {
      color: red;
      font-size: 0.22rem;
      ellipsis();
    }
  }
}
</style>


